const Koa = require('koa');
const path = require('path');
const static = require('koa-static');

const app  = new Koa();

const staticPath='./static';

app.use(static(path.join(__dirname,staticPath)));

app.use(async (ctx) => {
    ctx.body = 'hello';
});

// 监听端口
app.listen(3000,() => {
    //监听回调
    console.log('app is start at port 3000');
});
